oldFileName = input("请输入要删除的文件名")
f = open(oldFileName,"r")
position = oldFileName.rfind(".")#从右边开始找，获取"."的位置
newFileName = oldFileName[:position] + "[副本]"+oldFileName[position:]
# print(f.read())#读取全部文件
content = f.read()
f2 = open(newFileName,"w")
f2.write(content)
f.close()
f2.close()



